import { createElement, createTextNode, mount,patch } from './vdom';
const oldVnode = createElement('div',{
    id:"container",style:{color:'red'},class:'oldBg'
},createTextNode('hello'));
const app = document.querySelector('#app');
mount(app, oldVnode);
document.querySelector('#differentAttributes')
.addEventListener('click', () => {
    const newVnode = createElement('div',{
        id:"container2",style:{color:'green'},class:'newBg'
    },createTextNode('hello'));
    patch(oldVnode,newVnode);
});